package blackitheima.Array;

import java.util.concurrent.ArrayBlockingQueue;

public class Foodie1 extends Thread {
    private ArrayBlockingQueue<String> list;
    public Foodie1(ArrayBlockingQueue<String> list) {
        this.list=list;
    }

    @Override
    public void run() {
        while(true){
            String take = null;
            try {
                take = list.take();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(take);
            System.out.println("洒家来吃酒");
        }
    }
}
